//-------------------------------------------------------------------
//	Copyright (c) 2010-2014  Zhirnov Andrey
//	This file is part of the "UX Standard Lib" project.
//	See copyright notice in "UX_STL_Core.h".
//-------------------------------------------------------------------

#ifdef __UX_STL_UNIT_TEST__

#include "../ux_stl_core.h"

using namespace UX_STL;
using namespace UXTypes;
using namespace UXMath;

void Test_Math_Color ()
{
	color4u c;
	uint8 R = 0x11;
	uint8 G = 0x22;
	uint8 B = 0x33;
	uint8 A = 0x44;

	c.FromIntRGB( (R<<16) | (G<<8) | B );
	ASSERT( c.R() == R );
	ASSERT( c.G() == G );
	ASSERT( c.B() == B );
	
	c.FromIntRGBA( (R<<24) | (G<<16) | (B<<8) | A );
	ASSERT( c.R() == R );
	ASSERT( c.G() == G );
	ASSERT( c.B() == B );
	ASSERT( c.A() == A );
	
	c.FromIntABGR( (A<<24) | (B<<16) | (G<<8) | R );
	ASSERT( c.R() == R );
	ASSERT( c.G() == G );
	ASSERT( c.B() == B );
	ASSERT( c.A() == A );
	
	c.FromIntARGB( (A<<24) | (R<<16) | (G<<8) | B );
	ASSERT( c.R() == R );
	ASSERT( c.G() == G );
	ASSERT( c.B() == B );
	ASSERT( c.A() == A );
}


#endif	// __UX_STL_UNIT_TEST__